<?php


namespace app;


use Stomp\Client;

class ActiveMQ
{
    //示例地址：https://github.com/stomp-php/stomp-php-examples
    public static function MQ()
    {
        $borker = "tcp://" . env('activeMq.mq_host') . ":" . env('activeMq.mq_port');
        $client = new Client($borker);
        return $client;
    }

    public static function send()
    {
        self::MQ()->send('/queue/examples', 'Hello World!');
    }
}